package com.proyecto.robomind;

import com.proyecto.robomind.game.GameLayout;
import com.proyecto.robomind.map.MapLayout;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class MainActivity extends Activity {

	Button runScriptBtn;
	Button createMapBtn;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);  
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        
        setContentView(R.layout.home); 
        
        runScriptBtn = (Button) findViewById(R.id.runScriptBtn);
        createMapBtn = (Button) findViewById(R.id.createMapBtn);
               
    }
    
    public void runScript(View v){
        Intent i = new Intent(this, GameLayout.class);
        startActivity(i);
    }
    
    public void createMap(View v){
        Intent i = new Intent(this, MapLayout.class);
        startActivity(i);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    
}
